package com.wx.day05.Annotation_aop.test2.Work.Service;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class Log_aspects {

    @Before("execution(* com.wx.day05.Annotation_aop.test2.Work.Service..*.*(..))")
    public void begin(){
        long currentTime = System.currentTimeMillis();
        System.out.println(currentTime+" begin");
    }

    @After("execution(* com.wx.day05.Annotation_aop.test2.Work.Service..*.*(..))")
    public void end(){
        long currentTime = System.currentTimeMillis();
        System.out.println(currentTime+" end");
    }
}
